package o;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.huawei.appgallery.common.media.api.OriginalMediaBean;
import java.util.ArrayList;
import java.util.List;
import o.blj.c;

public class blb extends PagerAdapter {
    private List<OriginalMediaBean> ˎ = new ArrayList();

    public blb(List<OriginalMediaBean> list) {
        this.ˎ.addAll(list);
    }

    public int getCount() {
        if (this.ˎ != null) {
            return this.ˎ.size();
        }
        return 0;
    }

    public boolean isViewFromObject(View view, Object obj) {
        return view == obj;
    }

    public Object instantiateItem(ViewGroup viewGroup, int i) {
        if (viewGroup == null) {
            return null;
        }
        Context context = viewGroup.getContext();
        View imageView = new ImageView(context);
        c cVar = new c();
        cVar.ˋ(((OriginalMediaBean) this.ˎ.get(i)).ᐝ());
        blj.ˋ().ॱ(context, imageView, cVar);
        viewGroup.addView(imageView);
        return imageView;
    }

    public void destroyItem(ViewGroup viewGroup, int i, Object obj) {
    }
}
